package com.i_art_engineer.meigong.activity;

import android.app.Activity;
import android.content.Intent;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.ImageView;

import com.i_art_engineer.meigong.R;
import com.squareup.picasso.Picasso;

/**
 * Created by quan on 2016/5/27.
 */
public class SingleImageActivity extends Activity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_single_image);
//        ImageView imageView=new ImageView(this);
        ImageView imageView= (ImageView) findViewById(R.id.iv);
        Intent intent=getIntent();
        if(intent!=null){
            String str=intent.getStringExtra("image");
            Log.i("SingleImageActivity ",str);
            Picasso.with(this).load(str).into(imageView);
        }
        imageView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                SingleImageActivity.this.finish();
            }
        });
    }
}
